package com.lfy.yunpicture.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lfy.yunpicture.model.dto.spaceuser.SpaceUserQueryRequest;
import com.lfy.yunpicture.model.entity.SpaceUser;
import com.lfy.yunpicture.model.vo.SpaceUserVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 团队空间成员服务
 *
*/
public interface SpaceUserService extends IService<SpaceUser> {

    /**
     * 校验数据
     *
     * @param spaceUser
     * @param add 对创建的数据进行校验
     */
    void validSpaceUser(SpaceUser spaceUser, boolean add);

    /**
     * 获取查询条件
     *
     * @param spaceUserQueryRequest
     * @return
     */
    QueryWrapper<SpaceUser> getQueryWrapper(SpaceUserQueryRequest spaceUserQueryRequest);
    
    /**
     * 获取团队空间成员封装
     *
     * @param spaceUser
     * @param request
     * @return
     */
    SpaceUserVO getSpaceUserVO(SpaceUser spaceUser, HttpServletRequest request);

    /**
     * 分页获取团队空间成员封装
     *
     * @param spaceUserPage
     * @param request
     * @return
     */
    Page<SpaceUserVO> getSpaceUserVOPage(Page<SpaceUser> spaceUserPage, HttpServletRequest request);
}
